package com.xjggb.io;

import java.io.FileWriter;
import java.io.IOException;

public class Demo03 {
    static String  fir= "D:\\lu\\1.txt";
    public static void main(String[] args) {

        show1();

    }

    public static void show2(){

    }


    public static void show1(){
        FileWriter fileWriter=null;
        try {
             fileWriter = new FileWriter(fir);

            fileWriter.write("来了小老弟1");
            fileWriter.flush();
            fileWriter.write("我是行健乖乖霸");
            fileWriter.write("\r\n");

            fileWriter.write("是我");



        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fileWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
